19. Exercise: Add IdlingResourceActivityTest in TeaTime

Exercise: Add IdlingResourceActivityTest in TeaTime

Add IdlingResourceActivityTest in TeaTime

In this exercise you will implement the IdlingResourceActivityTest. We will create a mock scenario in the app that simulates a time delay when downloading menu images and descriptions into the MenuActivity.

To help you get started I’ve added the SimpleIdlingResource class which is an implementation of IdlingResource for you to use.

You will need to modify MenuActivity to properly implement the interface ImageDownloader which is a callback interface. Refer back to the previous concepts if you need a hint.

When the callback finishes executing, it will return the arraylist of Tea objects with the images and tea names back to the MenuActivity.

Exercise Code

Exercise: TESP.04-Exercise-AddIdlingResourceMenuActivityTest

Task Description:

Follow the TODOs to complete this exercise:

Task List:

Task Feedback:

Nice job connecting all the pieces!

Solution: [TESP.04-Solution-AddIdlingResourceMenuActivityTest][Diff]